POV-Ray : Newsgroups : povray.advanced-users : Tetrahedron Macro that uses Prism primative : Re: Tetrahedron Macro that uses Prism primative Server Time
29 Jul 2024 04:25:20 EDT (-0400)
  Re: Tetrahedron Macro that uses Prism primative  
From: Warp
Date: 7 Dec 2002 17:19:19
Message: <3df273e6@news.povray.org>
Christopher James Huff <chr### [at] maccom> wrote:
> You are correct (assuming no uneven scaling or shearing), but I think a 
> box would be a better choice. A sphere doesn't fit a tetrahedron that 
> closely, a box isn't much if at all better but is faster to test.

  Have you actually made the math, which shape "wastes" more space when
bounding (optimally) a regular tetrahedron ("regular" meaning all sides
have the same length), the sphere or the box?
  I wouldn't be so sure that the optimal box is smaller than the optimal
sphere ("smaller" meaning that its volume is smaller), although I can't
be sure of the contrary either.

  Also I think that a ray-sphere intersection is faster than a ray-box
intersection, so the sphere is in that sense a better bounding object.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.